<?php

use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {
    $router->get('/', 'HomeController@index');
    $router->post('/import', 'ImportController@import');
    $router->any('/getExcelTmp/{model}', 'ImportController@importTmpUrl');
    $router->group(['prefix' => 'frontend'],function ($router){
        $router->resource('users', UserController::class);
    });
    $router->group(['prefix' => 'category'],function ($router){
        $router->resource('area', AreaController::class);
        $router->resource('scene', SceneController::class);
        $router->resource('spot', SpotController::class);
        $router->resource('info', SceneInfoController::class);
        $router->resource('type', TypeController::class);
    });
    $router->group(['prefix' => 'resources'],function ($router){
        $router->resource('monitor', MonitorController::class);
        $router->resource('cts', CtsController::class);
        $router->resource('cts_month_data', CtsMonthDataController::class);
        $router->resource('hotel', HotelController::class);
        $router->resource('rural', RuralController::class);
        $router->resource('guide', GuideController::class);
        $router->resource('car', CarController::class);
        $router->resource('team', TeamController::class);
        $router->resource('car_management', VehicleMaintenanceController::class);
    });
    $router->group(['prefix' => 'monitor'],function ($router){
        $router->resource('monitor', MonitorController::class);
        $router->resource('alarm', MonitorAlarmController::class);
        $router->resource('charge', MonitorChargeController::class);
    });
    $router->group(['prefix' => 'operate'],function ($router){
        $router->resource('gdp', GdpController::class);
        $router->resource('shop', ShopController::class);
        $router->resource('restaurant', RestaurantController::class);
        $router->resource('ctsProduct', CtsProductController::class);

    });
    $router->group(['prefix' => 'integrity'],function ($router){
        $router->resource('unhandle', ComplaintController::class);
        $router->resource('handle', HandleController::class);
        $router->resource('handled', HandledController::class);
    });
    $router->group(['prefix' => 'flow'],function ($router){
        $router->resource('holiday', HolidayController::class);
        $router->resource('flow', FlowController::class);
        $router->resource('stay', StayTimeController::class);
        $router->resource('teamPerson', TeamPersonController::class);
        $router->resource('itinerary', ItineraryController::class);
        $router->resource('sightseeingWay',SightseeingWayController::class);
    });
    $router->group(['prefix' => 'management'],function ($router){
        $router->resource('mechanism', MechanismController::class);
        $router->resource('department', DepartmentController::class);
        $router->resource('post', PostController::class);
        $router->resource('management', ManagementController::class);
    });
    $router->resource('notice', NoticeController::class);
    $router->resource('credit', CreditController::class);
    $router->resource('consensus', ConsensusController::class);
    $router->resource('scenePerson', ScenePersonController::class);
    $router->resource('sceneIncome', SceneIncomeController::class);
});
